import java.awt.Image;
import java.awt.Rectangle;

import javax.swing.ImageIcon;

 public class Background extends Entity{
	 public Image image;	 
	 protected boolean collision;	 
	 protected boolean visas = true;
	 
	  public void loadImage(String name){
		  image = new ImageIcon (getClass().getResource(name)).getImage();
	  } 
	 
	  public Image getImage() {
		return image;
	  }
  
	  public int getWidth(){
		return image.getWidth(null);
	 }
	 
	 public int getHeight(){
		return image.getHeight(null);
	 }
	 
	 public Rectangle getBounds(){
		return new Rectangle((int) getX(), (int) getY(), getWidth(), getHeight());
	 }
	 
	 public void collided(boolean col){
		 collision = col;
	 }
	 
	 public boolean isCollided(){
		 return collision;
	 }
	 
	 public void setVisible(boolean vis){
		 visas = vis;
	 }
	 
	 public boolean isVisible(){
		 return visas;
	 }
 }//class